<!DOCTYPE html>
<!-- saved from url=(0044)https://www.layui.com/admin/pro/#/user/login -->
<html>
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>{:sys_config('SITE_NAME')} - 管理后台</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/static/admin/layui/css/layui.css">
    <link rel="stylesheet" href="/static/admin/css/admin.css">
    <link rel="stylesheet" href="/static/admin/css/login.css">
</head>
<body layadmin-themealias="default" class="layui-layout-body">
<div id="LAY_app" class="layadmin-tabspage-none">
    <div class="layadmin-user-login layadmin-user-display-show" id="LAY-user-login" style="display: none;">
        <div class="layadmin-user-login-main">
            <div class="layadmin-user-login-box layadmin-user-login-header">
                <h2>{:sys_config('SITE_NAME')}</h2>
            </div>
            <div class="layadmin-user-login-box layadmin-user-login-body layui-form">
                <div class="layui-form-item">
                    <label class="layadmin-user-login-icon layui-icon layui-icon-username" for="LAY-user-login-username"></label>
                    <input type="text" name="user_name" id="user_name" lay-verify="required" placeholder="用户名" class="layui-input">
                </div>
                <div class="layui-form-item">
                    <label class="layadmin-user-login-icon layui-icon layui-icon-password" for="LAY-user-login-password"></label>
                    <input type="password" name="pass_word" id="pass_word" lay-verify="required" placeholder="密码" class="layui-input">
                </div>
                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs7">
                            <label class="layadmin-user-login-icon layui-icon layui-icon-vercode" for="LAY-user-login-vercode"></label>
                            <input type="text" name="verify_code" id="verify_code" lay-verify="required" placeholder="图形验证码" class="layui-input">
                        </div>
                        <div class="layui-col-xs5">
                            <div style="margin-left: 10px;">
                                <img onclick="this.src='{:captcha_src()}'" src="{:captcha_src()}" class="layadmin-user-login-codeimg" id="verify_code">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <button class="layui-btn layui-btn-fluid" lay-submit="" lay-filter="submit">登 入</button>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script src="/static/admin/layui/layui.js?v={$version}"></script>
<script>
    layui.use(['layer', 'form'], function(){
        var layer = layui.layer,
            $ = layui.$,
            form = layui.form;
        form.on('submit(submit)', function(obj){
            var url = '{:url('login/login')}';
            $.post(url,obj.field,function(data) {
                if(data.code == 10000){
                    window.location.href = '{:url('/admin/index/index')}';
                }else{
                    layer.msg(data.msg);
                    $('#verify_code').attr('src','{:captcha_src()}');
                }
            });
        });
    });
</script>
</html>